<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>学生在线考试系统</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" th:href="@{~/css/bootstrap.min.css}">
    <script src="js/bootstrap.bundle.js" th:src="@{~/js/bootstrap.bundle.js}"></script>
    <link rel="stylesheet" href="my/style.css" th:href="@{~/my/style.css}">
</head>
<body class="d-flex vh-100 overflow-hidden">
<div class="d-flex flex-column flex-grow-1">
    <nav class="navbar navbar-expand navbar-dark bg-dark bg-gradient">
        <div class="container-fluid">
            <a class="navbar-brand" href="#">学生在线考试系统</a>
            <div class="collapse navbar-collapse">
                <ul class="navbar-nav me-auto mb-2 mb-lg-0">
                    <li class="nav-item nav-link" th:if="${admin}">
                        管理员端
                    </li>
                    <li class="nav-item nav-link" th:if="${student}">
                        学生端
                    </li>
                    <li class="nav-item nav-link" th:if="${teacher}">
                        教师端
                    </li>
                    <li class="nav-item nav-link" th:text="${#dates.format(date,'yyyy年 MM 月 dd 日 hh : mm')}">
                        2018年 9 月 9 日
                    </li>
                </ul>
                <div class="navbar-text">
                    当前用户：<span th:if="${tacher}" th:text="${teacher.name}">
                    王铭</span><span th:if="${admin}" th:text="${admin.name}">
                    王铭</span><span th:if="${student}" th:text="${student.name}">
                    王铭</span>
                </div>
                <div class="navbar-text">
                    <a class="nav-link" th:href="@{logout}">注销</a>
                </div>
            </div>
        </div>
    </nav>
    <div class="d-flex">
        <div class="d-flex justify-content-center" style="width: 200px">
        <span class="fs-5 align-self-center" data-bs-toggle="collapse" data-bs-target="#main-list"
              aria-expanded="false">菜单</span>
        </div>
        <nav class="navbar navbar-light bg-light flex-grow-1">
            <div class="container-fluid" th:remove="all">
                当前页面:
                <span class="navbar-brand mb-0 h1" th:text="${current}">试题创编></span>
            </div>
        </nav>
    </div>
    <div class="d-flex flex-grow-1 overflow-auto">
        <div class="border collapse" id="main-list" style="min-width: 200px;">
            <div id="admin-menu-list" th:if="${admin}">
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#lm1">
                            用户管理
                        </div>
                    </h3>
                    <div id="lm1" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="students">学生列表</a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="teachers">教师列表</a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="admins">管理员列表</a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#lm2">
                            卷库管理
                        </div>
                    </h3>
                    <div id="lm2" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="exam-paper">
                                试卷列表
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="new-exam-paper">
                                试卷创编
                            </a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#lm3">
                            题库管理
                        </div>
                    </h3>
                    <div id="lm3" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="questions">
                                题目列表
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="add-a-question">
                                题目创编
                            </a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#lm4">
                            个人中心
                        </div>
                    </h3>
                    <div id="lm4" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="account-info">
                                账户信息
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="change-pwd">
                                修改密码
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div id="teacher-menu-list" th:if="${teacher}">
                <div class="accordion-item">
                    <div class="accordion-body" th:remove="all">
                        主页
                    </div>
                </div>

                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#tlm1">
                            考卷批改

                        </div>
                    </h3>
                    <div id="tlm1" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="papers-uncheck">待批改</a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="papers-checked">
                                已批改
                            </a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#tlm2">
                            卷库管理
                        </div>
                    </h3>
                    <div id="tlm2" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="exam-papers">
                                我的试卷
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="new-exam-paper">
                                试卷创编
                            </a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#lm3">
                            题库管理
                        </div>
                    </h3>
                    <div id="lm3" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="questions">
                                题目列表
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="/add-a-question">
                                题目创编
                            </a>
                        </div>
                    </div>
                </div>

                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#tlm3">
                            班级管理
                        </div>
                    </h3>
                    <div id="tlm3" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="class-list-pageful">
                                我的班级
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="add-class">
                                创建班级
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="class-student-pageful?code=0">
                                我的学生
                            </a>
                        </div>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#tlm4">
                            个人中心
                        </div>
                    </h3>
                    <div id="tlm4" class="accordion-collapse collapse">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="account-info">
                                账户信息
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="change-pwd">
                                修改密码
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div id="student-menu-list" th:if="${student}">
                <div class="accordion-item">
                    <div class="accordion-body" th:remove="all">
                        主页
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-body">
                        <a class="text-decoration-none" target="main" href="tasks">
                            任务中心
                        </a>
                    </div>
                </div>

                <div class="accordion-item">
                    <div class="accordion-body">
                        <a class="text-decoration-none" target="main" href="my-papers">
                            我的试卷
                        </a>
                    </div>
                </div>
                <div class="accordion-item">
                    <h3 class="accordion-header">
                        <div class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
                             data-bs-target="#slm1">
                            班级管理
                        </div>
                    </h3>
                    <div id="slm1" class="accordion-collapse collapse ">
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="my-class">
                                我的班级
                            </a>
                        </div>
                        <div class="accordion-body">
                            <a class="text-decoration-none" target="main" href="to-join-class">
                                加入班级
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <iframe name="main" id="main" class="bg-light flex-grow-1 p-2 overflow-auto" src="tasks">

        </iframe>
    </div>
</div>
</body>
</html>